<?php
    use User\Model\MeetingModel;
?>
<ul class="nav nav-tabs nav-justified">
    <li class="active"><a href="#">基础设置</a></li>
    <li><a href="<?php echo '/User/Meeting/lucky_item?meetId=' . I('get.meetId', '', '');?>" onmouseenter="$(this).css('color', '#FFFFFF');" onmouseleave="$(this).css('color', '#65CEA7');">奖项设置</a></li>
    <li><a href="<?php echo '/User/Meeting/lucky_user?meetId=' . I('get.meetId', '', '');?>" onmouseenter="$(this).css('color', '#FFFFFF');" onmouseleave="$(this).css('color', '#65CEA7');">中奖名单</a></li>
</ul>
<div class="row">
    <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading" >
            </header>
            <div class="panel-body">
                <form class="form-horizontal" method="post" enctype="multipart/form-data" action="<?php echo '/User/Meeting/lucky_edit?meetId=' . I('get.meetId', '', '');?>">
                    <input type="hidden" value="<?php echo I('get.meetId', '', '');?>" name="meetId" id="meetId">

                    <div class="form-group">
                        <label class="col-sm-2 col-sm-2 control-label">背景音乐:</label>

                        <div class="col-sm-10">
                            <?php if(!empty($lucky['back_music'])){
                            echo '<audio src="' . $lucky['back_music'] .'" style="width: 200px;height: 30px;" controls></audio>';
                            }?>
                            <input name="back_music" type="file">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 col-sm-2 control-label">背景图片:</label>

                        <div class="col-sm-10">
                            <img src="{$lucky['back_img']}" alt="" style="width: 200px;height: 200px;">
                            <input name="back_img" type="file">
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-10">
                            <button class="btn btn-primary" type="submit" id="submit">提交</button>
                            <a class="btn btn-default" href="<?php echo '/User/Meeting/live?meetId=' . I('get.meetId', '', '')?>">取消</a>
                        </div>
                    </div>

                </form>
            </div>
        </section>
    </div>
</div>
<script>
    $(".need").each(function(){
        $(this).prepend("<span style='color:red'>*</span>");
    });
    var message = "{$message}";
    if(message != ''){
        alert(message);
    }
    $("#submit").click(function(){
       $("form").submit();
    });
</script>